function addAge2(target: Function) {
  console.log("addAge2开始工作 target=", target);//[Function: PersonII]

  // 所有target实例的age皆为18
  target.prototype.age = 18;
}

/* 给类的实例注入默认age属性值 */
@addAge2
class PersonII {
  name: string;
  age!: number;

  constructor(name: string) {
    this.name = name;
  }
}

let person = new PersonII("hello");

console.log(person.age); // 18
